package top.fongs.spring_security_jwt.web.controllers.auth;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import top.fongs.spring_security_jwt.service.inter.auth.AuthService;

@RestController
public class AuthController {
    private final AuthService authService;

    @Autowired
    public AuthController( AuthService authService ) {
        this.authService = authService;
    }

    @PostMapping( "sign-in" )
    public Object sign_in( String username, String password ) {
        return this.authService.signIn( username, password );
    }
}
